﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace StudentDemoP18 {
    internal class Program {
        static void Main(string[] args) {
            Student stu = new Student();
            int y = 100;
            stu.AddOne(y);
            //这里打印的是100，因为是值传递(基本数据类型)
            Console.WriteLine(y);
            Console.ReadLine();
        }
    }

    class Student {

        public void AddOne(int x) {
            x = x + 1;
            //这里打印的是101
            Console.WriteLine(x);
        }
    }
}
